package com.musicstore.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

import com.musicstore.biz.GenreBiz;
import com.musicstore.dao.GenreDao;
import com.musicstore.entity.GenreEntity;
@Service("genreBiz")
public class GenreBizImpl implements GenreBiz {
	@Autowired
	private GenreDao genreDao;

	public List<GenreEntity> getAll() {
		return genreDao.getAll();
	}
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		GenreBiz genreBiz = (GenreBiz) context.getBean("genreBiz");
		List<GenreEntity> list = genreBiz.getAll();
		System.out.println(list.toString());
	}
}
